<%@ page language="java" import="java.util.*"
	contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h2 class="contentTitle">修改多项选择题题目</h2>
<script type="text/javascript">
function checks(a){
	var ids=new Array();
	if($("input[name='zqs2']:checked").size()<2){
		alert("请选择多个答案！");
		return false;
	}
	$("input[name='zqs2']:checked").each(function(i,obj){
		ids[i]=$(obj).val();
	});
	var idStr=ids.join("");
	$("#zq2").val(idStr);
	return iframeCallback(a, navTabAjaxDone);
}
</script>
<form action="<c:url value='tmcurd.do?method=edtsave'/>" method="post"
	class='required-validate pageForm'
	onsubmit="return checks(this)">
	<input type="hidden" name="id" value="${tm.id}" />
	<input type="hidden" name="zq" id="zq2" value="${tm.zq}" />
	<div class="pageFormContent" layoutH="97">
		<div class="unit">
			<label>科目名称</label> ${tm.tkname}
		</div>
		<div class="unit">
			<div class="unit">
				<label>题目内容</label>
				<textarea class="editor required" name="tm" rows="10" cols="80"
					tools="simple">${tm.tm}</textarea>
			</div>
		</div>
		<div class="unit">
			<label>选项A</label> <input type="checkbox" name="zqs2" value="A" /><br />
			<input type="text" name="d1" value="${tm.d1}"
				class="textInput required" maxlength="200" size="100" />
		</div>
		<div class="unit">
			<label>选项B</label> <input type="checkbox" name="zqs2" value="B" /><br />
			<input type="text" name="d2" value="${tm.d2}"
				class="textInput required" maxlength="200" size="100" />
		</div>
		<div class="unit">
			<label>选项C</label> <input type="checkbox" name="zqs2" value="C" /><br />
			<input type="text" name="d3" value="${tm.d3}"
				class="textInput required" maxlength="200" size="100" />
		</div>
		<div class="unit">
			<label>选项D</label> <input type="checkbox" name="zqs2" value="D" /><br />
			<input type="text" name="d4" value="${tm.d4}"
				class="textInput required" maxlength="200" size="100" />
		</div>
		<div class="unit">
			<label>正确答案</label> <input type="text" placeholder="选择,答案在提交时自动填入."
				readonly="readonly" value="${tm.zq}" class="textInput"
				maxlength="200" size="100" />
		</div>
		<div class="unit">
			<label>题目分数</label> <input type="text" name="fs" value="${tm.fs}"
				class="textInput required digits" maxlength="200" size="100" />
		</div>

	</div>
	<div class="formBar">
		<ul>
			<li><div class="buttonActive">
					<div class="buttonContent">
						<button type="submit">保存</button>
					</div>
				</div></li>
			<li><div class="button">
					<div class="buttonContent">
						<button type="button" class="close">关闭</button>
					</div>
				</div></li>
		</ul>
	</div>
</form>